package com.dhcc.bpm.alarm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiafayu
 * @since 2022-02-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ALARM_STRATEGY")
@ApiModel(value="AlarmStrategy对象", description="预警策略表")
public class AlarmStrategy implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(
            value = "ID",
            type = IdType.ASSIGN_ID
    )
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long id;

    @ApiModelProperty(value = "系统编号")
    @TableField("SYSTEMNO")
    private String systemno;

    @ApiModelProperty(value = "系统名称")
    @TableField("SYSTEMNAME")
    private String systemname;

    @ApiModelProperty(value = "策略名称")
    @TableField("STRATEGY_NAME")
    private String strategyName;

    @ApiModelProperty(value = "策略编号")
    @TableField("STRATEGY_CODE")
    private String strategyCode;

    @ApiModelProperty(value = "策略类型(公共告警、交易告警)")
    @TableField("STRATEGY_TYPE")
    private String strategyType;

    @ApiModelProperty(value = "场景风险")
    @TableField("TX_RISK")
    private String txRisk;

    @ApiModelProperty(value = "告警内容类型01阈值告警02")
    @TableField("CONTENT_TYPE")
    private String contentType;

    @ApiModelProperty(value = "策略检测周期（时、分、秒、天）")
    @TableField("STRATEGY_PERIOD")
    private String strategyPeriod;

    @TableField("ALARM_TERM")
    private String alarmTerm;

    @ApiModelProperty(value = "阈值")
    @TableField("ALARM_THRESHOLD")
    private String alarmThreshold;

    @ApiModelProperty(value = "预警规则-规则描述")
    @TableField("RULE_DESC")
    private String ruleDesc;

    @ApiModelProperty(value = "规则脚本/shell或sql")
    @TableField("RULE_SCRIPT")
    private String ruleScript;

    @ApiModelProperty(value = "预警模板")
    @TableField("ALARM_CONTENT_MOULD")
    private String alarmContentMould;

    @ApiModelProperty(value = "触发方式01")
    @TableField("TRIGGER_METHOD")
    private String triggerMethod;

    @ApiModelProperty(value = "执行方式01")
    @TableField("EXEC_METHOD")
    private String execMethod;

    @ApiModelProperty(value = "预警解除01")
    @TableField("REMOVE_METHOD")
    private String removeMethod;

    @ApiModelProperty(value = "关联批量任务编号（定时时使用-时间、频次）")
    @TableField("BATCH_TASK_NO")
    private String batchTaskNo;

    @ApiModelProperty(value = "最后维护时间yyyymmddHH24miss")
    @TableField("LAST_TIME")
    private String lastTime;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATE_USER")
    private String createUser;

    @ApiModelProperty(value = "创建部门")
    @TableField("CREATE_DEPT")
    private String createDept;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    private String createTime;

    @ApiModelProperty(value = "更新者")
    @TableField("UPDATE_USER")
    private String updateUser;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    private String updateTime;

    @ApiModelProperty(value = "租户ID")
    @TableField("TENANT_ID")
    private String tenantId;

    @ApiModelProperty(value = "状态")
    @TableField("ALARM_STATUS")
    private String alarmStatus;

    @ApiModelProperty(value = "删除标识")
    @TableField("IS_DELETED")
    private String isDeleted;

    @ApiModelProperty(value = "策略交易类型")
    @TableField("TX_TYPE")
    private String txType;


}
